<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function A(){

}
function B(){

}
var a = new A()
B.prototype = a

var b = new B();
console.log(b instanceof A);
// 前面的对象是否在后面对象的原型链上
console.log(A.prototype.isPrototypeOf(b));
console.log(a.isPrototypeOf(b));
</script>
</body>
</html>